package org.come.Jpanel;

import java.awt.Dimension;
import java.awt.Graphics;

import javax.swing.ImageIcon;
import javax.swing.JPanel;

import com.tool.btn.FormsOnOffBtn;

public class PlayRulesJpanel extends JPanel {

    public PlayRulesJpanel() {
        this.setPreferredSize(new Dimension(360, 310));
        this.setOpaque(false);
        this.setLayout(null);
        // 关闭按钮事件
        FormsOnOffBtn offBtn = new FormsOnOffBtn("inkImg/hongmu/1/S74.png", 1, 72);
        offBtn.setBounds(334, 0, 25, 25);
        this.add(offBtn);
    }

    private ImageIcon icon;

    @Override
    protected void paintComponent(Graphics g) {
        super.paintComponent(g);
        if (icon == null) {
            icon = new ImageIcon("inkImg/hongmu/2/重铸攻略.png");
        }
        // 道具栏
        g.drawImage(icon.getImage(), 0, 0, 360, 310, this);
    }
}
